<?
/**
* Copyright (c) 2002-2007 BioWare Corp.
* http://www.bigdaddymonitor.org
*
* This file is part of the BigDaddy Monitoring
* program. It is free software distributed under
* the terms of the BSD License. It is ditributed
* in the hopes that it will be useful, but
* WITHOUT ANY WARRANTY; without event the implied
* warranty of MERCHANTABILITY or FITNESS FOR A
* PARTICULAR PURPOSE.
*
* The BSD License is available from:
* http://www.opensource.org/licenses/bsd-license.php
**/
?>
<p>Phone Tags are used in the ini files so that we can reference a phone/email with a single ID and change the number/email here.</p>


<div class="orgbar">
<span class="text">
<p>Phone/Email Tags</p>
</span>

</div>

<table border="0" cellpadding="0" cellspacing="0" width="97%">

<?

$aPhoneTags = $BigDaddyData->GetPhoneTags();

if (!is_array($aPhoneTags))
{
?>
	<tr valign="middle">
	<td class="lineitem">
	<div align="center"><b>No phonetags in the database</b></div>
	</td>
	</tr>
<?
}
else
{
	foreach ($aPhoneTags as $nIndex => $row)
	{
?>

	<tr valign="middle">
		<td class="lineitem" width="200">
			<?=$row["ID"];?>
		</td>
		<td class="lineitem" width="200">
			<?=$row["phoneNumber"];?>
		</td>
        <td class="lineitem" width="200">
			<?=$row["notes"];?>
		</td>
		<td class="lineitem" nowrap>
		<div class="buttons">
		
        <?
		if ($BigDaddy->IsUserAllowedByAction("meta-admin"))
		{
			?>
			<a href="<?=$_SERVER["PHP_SELF"];?>?page=PhoneTagEdit&tagID=<?=$row["ID"];?>">edit</a>
			<?
		}
		else
		{
			?>
			<span class="dead">edit</span>
			<?
		}
		?>
        
		<?
		if ($BigDaddy->IsUserAllowedByAction("meta-admin"))
		{
			?>
			<a href="/monitor/query_tag.php?action=deletetag&tagID=<?=$row["ID"];?>" onclick="javascript: return confirm('Delete this PhoneTag: <?=$row["ID"];?>');">delete</a>
			<?
		}
		else
		{
			?>
			<span class="dead">delete</span>
			<?
		}
		?>
		

</div>
</td>
</tr>
<?
	}
}
?>

</table>
